package net.asrsmid.invoker.rs;

/**
 * @author Chen WANG
 * @version 1.0
 * @created 05-mai-2011 11:53:12
 */
public class PdfDeviceInformation extends DeviceInformation {
	public static final String COLUMNS = "Columns";
	public static final String COLUMN_SPACING = "ColumnSpacing";
	public static final String DPI_X = "DpiX";
	public static final String DPI_Y = "DpiY";
	public static final String START_PAGE = "StartPage";
	public static final String END_PAGE = "EndPage";
	public static final String HUMAN_READABLE_PDF = "HumanReadablePDF";
	public static final String MARGIN_TOP = "MarginTop";
	public static final String MARGIN_BOTTOM = "MarginBottom";
	public static final String MARGIN_LEFT = "MarginLeft";
	public static final String MARGIN_RIGHT = "MarginRight";
	public static final String PAGE_HEIGHT = "PageHeight";
	public static final String PAGE_WIDTH = "PageWidth";

	/**
	 * 
	 * @param nbColumns
	 */
	public void setColumns(int nbColumns){
		deviceInfoMap.put(COLUMNS, Integer.toString(nbColumns));
	}

	/**
	 * 
	 * @param columnSpacing
	 */
	public void setColumnSpacing(int columnSpacing){
		deviceInfoMap.put(COLUMN_SPACING, Integer.toString(columnSpacing));
	}

	/**
	 * 
	 * @param xResolution
	 */
	public void setDpiX(int xResolution){
		deviceInfoMap.put(DPI_X, Integer.toString(xResolution));
	}

	/**
	 * 
	 * @param yResolution
	 */
	public void setDpiY(int yResolution){
		deviceInfoMap.put(DPI_Y, Integer.toString(yResolution));
	}

	/**
	 * 
	 * @param startPage
	 */
	public void setStartPage(int startPage){
		deviceInfoMap.put(START_PAGE, Integer.toString(startPage));
	}

	/**
	 * 
	 * @param endPage
	 */
	public void setEndPage(int endPage){
		deviceInfoMap.put(END_PAGE, Integer.toString(endPage));
	}

	/**
	 * 
	 * @param value
	 */
	public void enableHumanReadablePDF(boolean value){
		deviceInfoMap.put(HUMAN_READABLE_PDF, value ? TRUE: FALSE);

	}

	/**
	 * 
	 * @param inch
	 */
	public void setMarginTop(float inch){
		deviceInfoMap.put(MARGIN_TOP, Float.toString(inch));
	}

	/**
	 * 
	 * @param inch
	 */
	public void setMarginBottom(float inch){
		deviceInfoMap.put(MARGIN_BOTTOM, Float.toString(inch));
	}

	/**
	 * 
	 * @param inch
	 */
	public void setMarginLeft(float inch){
		deviceInfoMap.put(MARGIN_LEFT, Float.toString(inch));
	}

	/**
	 * 
	 * @param inch
	 */
	public void setMarginRight(float inch){
		deviceInfoMap.put(MARGIN_RIGHT, Float.toString(inch));
	}

	/**
	 * 
	 * @param inch
	 */
	public void setPageHeight(float inch){
		deviceInfoMap.put(PAGE_HEIGHT, Float.toString(inch));
	}

	/**
	 * 
	 * @param inch
	 */
	public void setPageWidth(float inch){
		deviceInfoMap.put(PAGE_WIDTH, Float.toString(inch));
	}
}